Master the Switch Method in JavaScript